package com.example.socket_client_demo;


import com.uwantsoft.goeasy.client.goeasyclient.GoEasy;
import com.uwantsoft.goeasy.client.goeasyclient.listener.GoEasyError;
import com.uwantsoft.goeasy.client.goeasyclient.listener.PublishListener;

/**
 * @author Chuanbao
 */
public class RestTest {

    public static void main(String[] args){

        GoEasy goEasy = new GoEasy("ba821151-e043-4dfb-a954-c73744c8d323");
        goEasy.publish("demo_channel ","test",new PublishListener(){
            @Override
            public void onSuccess() {
                System.out.println("Publish successfully!");
            }

            @Override
            public void onFailed(GoEasyError error) {
                System.out.println("Publish failed["+error.getCode()+":"+error.getContent()+"].");
            }
        });

    }
}
